<table width="95%" border="0" cellspacing="0" cellpadding="0" style="line-height: 25px;" id="visitrecord">
	<tr>
	  <td colspan="4" class="text_size19">Pristine Solutions (Pvt) Ltd.</td>
	    <td width="24%" align="right"><div style="padding: 30px 0 0 0;" class="edit-icoset"><a href="javascript: void(0);" onClick="window.print();"><img src="/images/icons/print.gif" />Print Page</a></div></td>
	</tr>	  
	<tr>
		<td colspan="5" class="text_size11">No: 130/1, Dehiwala Road, <br /> Borellasgamuwa, Sri Lanka.<br />
				Tel : +94-11-4651175<br />
				Fax : +94-11-2516820<br />
				E-mail: cs@pristineworldwide.com &nbsp; / &nbsp;Web: www.pristineworldwide.com</td>
	</tr>
	<tr>
		<td colspan="5">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="5" align="center" valign="top" class="text_size19">Visit Record </td>
	</tr>
	<tr>
		<td width="21%">&nbsp;</td>
		<td width="30%">&nbsp;</td>
		<td width="5%">&nbsp;</td>
		<td width="20%">&nbsp;</td>
	    <td>&nbsp;</td>
	</tr>
	<tr>
	    <td rowspan="2" valign="top" class="text_size11_normal table_border2" style="padding: 0 0 0 5px;">Customer</td>
	    <td rowspan="2" valign="top" class="text_size11_normal table_border2" style="padding: 0 0 0 5px;"><?php echo $this->customer['customer_name']; ?></td>
	    <td rowspan="2">&nbsp;</td>
	    <td class="text_size11_normal table_border2" style="padding: 0 0 0 5px; line-height: 20px;">Record Number </td>
	    <td class="text_size11_normal table_border2" style="padding: 0 0 0 5px; line-height: 20px;"><?php echo $this->event_arr['serial_no']; ?></td>
	</tr>
	<tr>
	    <td class="text_size11_normal table_border2" style="padding: 0 0 0 5px; line-height: 20px;">Date</td>
	    <td class="text_size11_normal table_border2" style="padding: 0 0 0 5px; line-height: 20px;"><?php echo $this->event_arr['date']; ?></td>
	</tr>
	<tr>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	</tr>
	<tr>
	    <td class="text_size11_normal table_border" align="left" valign="middle">Time Chargeble </td>
	    <td class="text_size11_normal table_border" align="left" valign="middle"><b><?php echo($this->event_arr['time_charge'] == 1)?"Yes":"No"; ?></b></td>
	    <td>&nbsp;</td>
	    <td colspan="2" rowspan="3" align="left" valign="top">
	    	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl_grid">
				<tr>
					<th align="center" valign="middle" class="text_size11_normal"><strong>Start Time</strong></th>
					<th align="center" valign="middle" class="text_size11_normal"><strong>End Time </strong></th>
					<th align="center" valign="middle" class="text_size11_normal"><strong>Total Time </strong></th>
				</tr>
				<tr>
					<td align="center" valign="middle"><span class="text_size11_normal table_border_screen"><?php echo $this->event_arr['start_time']; ?></span></td>
					<td align="center" valign="middle"><span class="text_size11_normal table_border_screen"><?php echo $this->event_arr['end_time']; ?></span></td>
					<td align="center" valign="middle"><span class="text_size11_normal table_border_screen">
					<?php
						$hours = $this->time_diff['hours'];
						$minutes = $this->time_diff['minutes'];    			    			
						if($hours != 0 && $minutes != 0)
						{
							if($hours == 1) 
							{
								$tot_hours = $hours . "hr " . $minutes . "mins";
							} else {
								$tot_hours = $hours . "hrs " . $minutes . "mins";
							}
				
						} else if($hours == 0) {
							$tot_hours = $minutes . "mins";
						} else if ($minutes == 0) {
							if($hours == 1) {
								$tot_hours = $hours . "hr";
							} else {
								$tot_hours = $hours . "hrs";
							}
						}
						echo $tot_hours;
					?>
					</span></td>
				</tr>
        	</table>        </td>
	</tr>
	<tr>
		<td class="text_size11_normal table_border" align="left" valign="middle">Transport Chargeble </td>
	    <td class="text_size11_normal table_border" align="left" valign="middle"><b><?php echo($this->event_arr['transport'] == 1)?"Yes":"No"; ?></b></td>
	    <td>&nbsp;</td>
    </tr>
	<tr>
	    <td class="text_size11_normal table_border" align="left" valign="middle">Service Agreement </td>
	    <td class="text_size11_normal table_border" align="left" valign="middle"><b><?php echo($this->event_arr['service_agreement'] == 1)?"Yes":"No"; ?></b></td>
	    <td>&nbsp;</td>
    </tr>
	<tr>
		<td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	</tr>
	<tr>
		<td colspan="5">
			<div align="center">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl_grid">
		    		<tr>
		    	  		<th width="22%" align="left" valign="middle" class="text_size11_normal" style="padding: 0 0 0 3px;"><strong>Event Members </strong></th>
						<th width="78%" align="center" valign="middle" class="text_size11_normal" style="padding: 0 0 0 3px;"><strong>Activity Details </strong></th>				
					</tr>
		      		<?php
		        		foreach ($this->activity_arr as $activity_entry) 
		        		{
					?>	        
					<tr>
						<td class="text_size11_normal" align="left" valign="top" style="padding: 5px 0 3px 3px;"><?php echo $activity_entry['first_name'] . " " . $activity_entry['last_name']; ?></td>
				        <td class="text_size11_normal" align="left" valign="top" style="padding: 5px 0 3px 10px;"><?php echo $activity_entry['ACTIVITY_SUB']; ?></td>			        
			      	</tr>
					<?php
		        		}
		        	?>
		    	</table>
		    </div>	    </td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	</tr>
	<tr>
		<td valign="top" align="left" class="text_size11_normal table_border_screen"><b>Additional Text</b></td>
	    <td colspan="4" valign="top" align="left" class="text_size11_normal table_border_screen"><i><?php echo $this->event_arr['additional_text']; ?></i></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	</tr>
	<tr>
		<td colspan="5" class="text_size13">Customer Notes: </td>
	</tr>
	<tr>
	    <td height="105" colspan="5" align="center" valign="middle" style="border: 1px solid #999999;">&nbsp;</td>
	</tr>
	<tr>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	</tr>
  <tr>
	    <td align="left" valign="middle" class="text_size13">For Pristine </td>
	    <td align="left" valign="middle">&nbsp;</td>
	    <td align="left" valign="middle">&nbsp;</td>
        <td align="left" valign="middle" class="text_size13">For Customer</td>
    <td align="left" valign="middle">&nbsp;</td>
	</tr>
	<tr>
	    <td colspan="5" align="left" valign="middle">
			<table width="100%" border="0" cellspacing="1" cellpadding="1" style="line-height:30px;">
				<tr>
					<td class="text_size11_2" width="16%" align="left" valign="bottom">Name</td>
					<td class="text_size11_2" width="31%" align="left" valign="bottom">..........................................................</td>
					<td class="text_size11_2" width="9%" align="left" valign="bottom">&nbsp;</td>
					<td class="text_size11_2" width="13%" align="left" valign="bottom">Name</td>
					<td class="text_size11_2" width="31%" align="left" valign="bottom">........................................................</td>
				</tr>
				<tr>
					<td class="text_size11_2" align="left" valign="bottom">Signature</td>
					<td class="text_size11_2" align="left" valign="bottom">..........................................................</td>
					<td class="text_size11_2" align="left" valign="bottom">&nbsp;</td>
					<td class="text_size11_2" align="left" valign="bottom">Signature</td>
					<td class="text_size11_2" align="left" valign="bottom">........................................................</td>
				</tr>
				<tr>
					<td class="text_size11_2" align="left" valign="bottom">Date</td>
					<td class="text_size11_2" align="left" valign="bottom">..........................................................</td>
					<td class="text_size11_2" align="left" valign="bottom">&nbsp;</td>
					<td class="text_size11_2" align="left" valign="bottom">Date</td>
					<td class="text_size11_2" align="left" valign="bottom">........................................................</td>
				</tr>
		  	</table>		</td>
	</tr>
</table>